"""
73 74 75 76 77 78 79 80 81
72 43 44 45 46 47 48 49 50
71 42 21 22 23 24 25 26 51
70 41 20  7  8  9 10 27 52
69 40 19  6  1  2 11 28 53
68 39 18  5  4  3 12 29 54
67 38 17 16 15 14 13 30 55
66 37 36 35 34 33 32 31 56
65 64 63 62 61 60 59 58 57

a * n ^ 2 + b * n + c

c = 3+5+7+9=24
a + b + c = 13+17+21+25=76
4a + 2b + c = 31+37+43+49=160

a + b = 52
3a + b = 84

2a = 32
a = 16

b = 36
"""

print 57 + 65 + 73 + 81
print (16 * 3 + 36) * 3 + 24 

t = 0
for i in range(500):
    t += (16 * i + 36) * i + 24
print t + 1